1. Field
The disclosure relates to a method, a system, and a computer program product for the reorganization of a fragmented directory of a storage data structure comprised of the fragmented directory and members.
2. Background
When a data set is allocated, a certain amount of space is reserved in units of blocks, tracks, cylinders, etc., on a storage disk or a storage device. A sequential data set may be comprised of one or more records that are processed in sequence. In the sequential data set the records in the data set are physically arranged one after another.
A partitioned data set (PDS) adds a layer of organization to the structure of the sequential data set. A PDS is comprised of a directory and zero or more members. Each member is like a sequential data set and has a simple name. The directory is a series of keyed blocks, which contain entries for the members in the PDS. Each entry is comprised of a member name and a pointer, and some optional user data. The PDS structure may provide efficient access to libraries of related members, such as load modules, program source modules, Job Control Language (JCL), etc. Many system data sets are also kept in PDSs, especially when such system data sets are comprised of many small related files.
A partitioned data set extended (PDSE) is comprised of a directory and zero or more members, just like a PDS. While the size of a PDS directory is fixed regardless of the number of members in the PDS data set, the size of a PDSE directory is flexible and expands to fit the members stored in the PDSE data set. In PDSE, the directory may expand automatically as needed, up to an addressing limit.
In PDSE, when the pages at the front of the data set are used up, an extra directory page may be put in the first available slot in the allocated space. If no space is left in the current extents, a new secondary extent may be added. The PDSE directory is an indexed structure, which improves search performance and the time taken to add a member entry. When a PDSE member is updated or replaced, it is written in the first available space. This is either at the end of the data set or in a space in the middle of the data set marked for reuse.